const express = require("express");
const HairProject = require("../models/hairProjects");
const router = new express.Router();


router.post("/hair_kind",async(req,res)=>{
    console.log(req.body);
    const result = await HairProject.create(req.body);
    res.send("数据提交成功！");
})

router.get('/hair_kind_search',async(req,res)=>{
    console.log(req.query);
    const result = await HairProject.find(req.query,{
        _id:0,
        __v:0
    });
    res.send(result);
})




module.exports = router;